package dpss.client;

import java.util.Scanner;

import dpss.api.DpssApi;
import dpss.commons.CustomLogger;

/**
 * 
 * @author Shewetaank Indora
 *
 */
public class PlayerOperations {
	
	private static CustomLogger logger = CustomLogger.getInstance();
	DpssApi dpssApi = null;
	/**
	 * 
	 */
	public int loginMenu(){
		
		boolean validInput = false;
		int choice = 0;
		Scanner userInput = new Scanner(System.in);
		
		logger.out("Please select from the following given options:");
		logger.out("1. Exit");
		
		while (!validInput) {
			try {
				choice = userInput.nextInt();
				validInput = true;
			} catch (Exception e) {
				logger.out("Invalid Input, please enter an integer.");
			}
		}
		userInput.close();
		return choice;
	}
	
	/**
	 * Provide menu to the user.
	 */
	public void showMenu() {
		logger.out("*******Welcome to Distributed Player Status System*******");
		logger.out("Please select the option");
		logger.out("1. Register");
		logger.out("2. Login");
	}

	/**
	 * Shows the admin menu
	 */
	public void showAdminMenu() {
		logger.out("Welcome admin, please select your choice:");
		logger.out("1. Get players status");
		logger.out("2. exit");
	}

}
